In This Topic
Document! X includes a custom MSBUILD task which can be used to integrate the build of documentation with your MSBUILD based build process.
MSBUILD Task Assembly Location
The Document! X 2017 MSBUILD Task assembly file is named Innovasys.DocumentX.Build.dll and can be found in a \bin sub-directory below the Document! X installation path. The default bin path is c:\Program Files\Innovasys\DocumentX2017\bin\ .
The MSBUILD Task Assembly requires other Document! X assemblies and should not be moved from the installation path.
Builds executed using the MSBUILD task require a full installation of Document! X. If you are integrating with a build on a build server, you must install a licensed copy of Document! X on the build server.
Integrating the custom MSBUILD task
To integrate the build of a Document! X project with your MSBUILD process, follow these steps:
- Open your MSBUILD project file (e.g. .proj, .vbproj, .csproj file) in notepad;
The project file is actually an MSBUILD Xml file that you will edit to add Document! X to the build tasks. For more information on MSBUILD, see the
MSBUILD documentation on MSDN.
- Add references to the MSBUILD task assembly in the file, as below:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
...
</PropertyGroup>
...
<ItemGroup>
...
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<UsingTask AssemblyFile="[BinPath]\Innovasys.DocumentX.Build.dll" TaskName="ProjectBuildTask" />
<Target Name="GenerateDocumentation" Condition=" '$(Configuration)' == 'Release' ">
<Innovasys.DocumentX.Build.ProjectBuildTask ProjectFileName="documentation\documentation.dxp"/>
</Target>
</Project>
- Replace [BinPath] in the sample above with the location of the assembly containing the MSBUILD task, outlined in the "MSBUILD Task Assembly Location" section earlier in this topic.
- Replace the ProjectFileName attribute value in the sample above with the location of your Document! X 2017 project file - either a full path and filename or a path relative to the MSBUILD project file.
- If required, you can also specify a BuildConfigurationName attribute to identify a specific saved Build Configuration to build. If no BuildConfigurationName is specified, the first Build Profile will be built. Example of Task Xml specifying a Build Configuration:
<Innovasys.DocumentX.Build.ProjectBuildTask
ProjectFileName="documentation\documentation.dxp"
BuildConfigurationName="MyBuildConfigurationName"/>
See Also